package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.UserCredit;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserCreditMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserCredit record);

    UserCredit selectByPrimaryKey(Long id);

    List<UserCredit> selectAll();

    int updateByPrimaryKey(UserCredit record);

    UserCredit selectByUserId(Long userId);

    void decreaseCreditByUserId(@Param("userId") Long userId, @Param("price") int price);
}